import Cookie from 'js-cookie';

/**
 * 是否登录
 * @returns 
 */
export function isLogin() {
  return !!Cookie.get('wavevpn');
}

/**
 * 删除某个cookie
 * @param name 
 * @returns 
 */
export function clearCookie(name: string) {
  return Cookie.remove(name);
}

/**
 * 设置cookie
 * @param name 
 * @param value 
 */
export function setCookie(name: string, value: any) {
  Cookie.set(name, value);
}

/**
 * 获取cookie
 * @param name 
 * @returns 
 */
export function getCookie(name: string) {
  return Cookie.get(name);
}